package bg.tu.varna.pms.model;

import java.io.Serializable;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.UUID;

public final class ChatMessage implements Serializable {
	private static final long serialVersionUID = 1333039114370400791L;
	private final String mChatRoomID;
	private final UUID mMessageID;
	private final String mSender;
	private final String mMessage;
	private final Calendar mSendDate;

	public ChatMessage(String chatRoomID, String sender, String message) {
		mChatRoomID = chatRoomID;
		mMessageID = UUID.randomUUID();
		mSender = sender.toLowerCase();
		mMessage = message;
		mSendDate = GregorianCalendar.getInstance();
	}

	public String getChatRoomID() {
		return mChatRoomID;
	}

	public UUID getMessageID() {
		return mMessageID;
	}

	public String getSender() {
		return mSender;
	}

	public String getMessage() {
		return mMessage;
	}

	public Calendar getSendDate() {
		return mSendDate;
	}
}
